import datetime
import time

a = time.strftime('%Y%m%d')
# print(a)
# print(b)
i = 0
d = 0
for i in a:
    d = d + int(i)
e = int(a) * d
f = str(e)
print(f[-6:])
